<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="p" uri="/WEB-INF/tld/page.tld" %>
<table class="table table-striped table-bordered bootstrap-datatable responsive">
    <thead>
    <tr>
        <th>景区名称</th>
        <th>景区地址</th>
        <th>上广告时间</th>
        <th>广告位有效时间</th>
        <th>广告状态</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach items="${adPage.list }" var="ad">
    <tr>
        <td>${ad.scene.name }</td>
        <td class="center">${ad.scene.sce_address }</td>
        <td class="center">${ad.launch_time_display }</td>
        <td class="center">${ad.from_time_display }-${ad.end_time_display }</td>
        <td class="center">${ad.isok_display }</td>
        <td class="center">
        	<a href="javascript:;" class="btn btn-default" 
        			onclick='changeStatus("${ad.ticketAdsId}", "${ad.isok }");'>
	        	<c:choose>
	        		<c:when test="${ad.isok eq 1 }">下架</c:when>
	        		<c:when test="${ad.isok eq 0 }">重新上架</c:when>
	        	</c:choose>
	        </a>
        </td>
    </tr>
    </c:forEach>
    </tbody>
</table>
<p:page pageNo="${adPage.pageNo }" totalPage="${adPage.totalPage }" 
	totalRow="${adPage.totalRow }"/>
